package com.modifiertech.lineage.handler;

import com.modifiertech.lineage.api.PlayerData;
import com.modifiertech.lineage.event.SkillAnimateCallEvent;
import com.modifiertech.lineage.event.SkillShortCutBindEvent;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.MinecraftForge;

/**
 *
 *
 * @description: default
 * @author: saliencemn
 * @mail: hackingmu@outlook.com
 * @date: 2024/8/18 22:39
 */
public class SkillAnimateCallHandler {
    //饿汉
    public static SkillAnimateCallHandler INSTANCE=new SkillAnimateCallHandler();
    private SkillAnimateCallHandler(){
    }

    /**实现 技能绑定快捷键NBT数据挂载
     *
     * @param entityPlayer
     * @param skillName
     */
    public void skillAnimateCall(EntityPlayer entityPlayer, String skillName,Boolean skillEnhance){
        MinecraftForge.EVENT_BUS.post(new SkillAnimateCallEvent.Pre(entityPlayer,skillName,skillEnhance));
//        boolean status = false;
//        status = data.skillAnimateCall(skillName);
//        if (status){
//            data.saveAndSync();
        MinecraftForge.EVENT_BUS.post(new SkillAnimateCallEvent.Post(entityPlayer,skillName,skillEnhance));
//        }else{
//            MinecraftForge.EVENT_BUS.post(new SkillAnimateCallEvent.PostErr(entityPlayer,skillName));
//        }
    }

}
